package com.gopay.common.constants.trans;

public enum CustChannelNum {
    /**
     * 01 - 一类账户认证渠道个数
     */
    one(1),

    /**
     * 02 - 二类账户认证渠道个数
     */
    two(3),

    /**
     * 03 - 三类账户认证渠道个数
     */
    three(5);
    
    public final int num;
    
    private CustChannelNum(int num){
        this.num = num;
    }
    
    //great equals
    public boolean ge(int num){
        return this.num >= num;
    }
    // less equals
    public boolean le(int num){
        return this.num <= num;
    }
    
    public int num(){
        return num;
    }
    
    //根据客户渠道认证个数判定 账户类型
    public static String custType(int num){
        if(three.le(num)){
            return CustCategory.three.toString();
        }
        if(two.le(num)){
            return CustCategory.two.toString();
        }
        return CustCategory.one.toString();
    }
    
}
